package com.andkrup.easygame.game.commands {
	
	/**
	 * @author Andkrup
	 */
	public class GameCommand implements IGameCommand {
		private var inputCode : String;
		private var event:String;

		public function get code() : String {
			return inputCode;
		}
		public function set code(value : String) : void {
			inputCode = value;
		}
		public function get eventType():String{
			return event;
		}
		public function set eventType(value:String):void{
			event = value;
		}
		
		public function equals(command:IGameCommand):Boolean{
			if(!command){
				return false;
			}
			if(!code){
				return false;
			}
			if(!eventType){
				return false;
			}
			return code == command.code && eventType == command.eventType;
		}
		
		public function execute():void{
			throw new Error("GameCommand:> execute() abstract method, please override");
		}
	}
}
